﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;

namespace Himp.Outpatient
{
    /// <summary>
    /// 门诊订单记录
    /// </summary>
    public class OtpOrdRec : AuditedAggregateRoot<Guid>, IMultiTenant
    {
        /// <summary>
        /// 业务来源
        /// </summary>
        public EnumOrdBizSouc OrdBizSouc { get; set; }

        /// <summary>
        /// 结算类型编码
        /// </summary>
        public string SetlTypeCode { get; set; }

        /// <summary>
        /// 结算类型名称
        /// </summary>
        public string SetlTypeName { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        public string OrdNo { get; set; }

        /// <summary>
        /// 发票号
        /// </summary>
        public string? Invono { get; set; }

        /// <summary>
        /// 订单标题
        /// </summary>
        public string OrdTitle { get; set; }

        /// <summary>
        /// 订单描述
        /// </summary>
        public string OrdExp { get; set; }

        /// <summary>
        /// 发票金额
        /// </summary>
        public decimal? InvoAmt { get; set; }

        /// <summary>
        /// 总金额
        /// </summary>
        public decimal TotAmt { get; set; }

        /// <summary>
        /// 折扣金额
        /// </summary>
        public decimal DiscAmt { get; set; }

        /// <summary>
        /// 预收金额
        /// </summary>
        public decimal AdvAmt { get; set; }

        /// <summary>
        /// 应收金额
        /// </summary>
        public decimal RecAmt { get; set; }

        /// <summary>
        /// 自付金额
        /// </summary>
        public decimal SelfpayAmt { get; set; }

        /// <summary>
        /// 实收金额
        /// </summary>
        public decimal? RecdAmt { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public EnumOrdStas OrdStas { get; set; }

        /// <summary>
        /// 支付有效期
        /// </summary>
        public DateTime PayValiTime { get; set; }

        /// <summary>
        /// 完成时间
        /// </summary>
        public DateTime? FinlTime { get; set; }

        /// <summary>
        /// 作废时间
        /// </summary>
        public DateTime? CnclTime { get; set; }

        /// <summary>
        /// 订单详细信息
        /// </summary>
        public List<OtpOrdDetl> OtpOrdDetls { get; set; }

        /// <summary>
        /// 支付记录
        /// </summary>
        public List<OtpPayRec> OtpPayRecs { get; set; }

        /// <summary>
        /// 费用信息
        /// </summary>
        public List<OtpOrdFeeDetl> OtpOrdFeeDetls { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid? TenantId { get; set; }
    }
}
